home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Application
/
WindowLocator.cp
< prev
next >
Wrap
Text File
|
2000-06-23
|
672b
|
34 lines
// WindowLocator.cp
#ifndef WindowLocator_h
#include "WindowLocator.h"
#endif
#ifndef StrangeWindow_h
#include "StrangeWindow.h"
#endif
#ifndef RedBlackLinkTree_h
#include "RedBlackLinkTree.h"
#endif
WindowLocator::TreeType& WindowLocator::Tree()
{
static TreeType tree;
return tree;
}
void WindowLocator::Register( Registration& registation )
{
Tree().Add( registation );
}
AbstractWindow& WindowLocator::LocateWindow( WindowObject& theWindow )
{
Registration *registration = Tree().Find( &theWindow );
if ( registration != 0 )
return **registration;
static StrangeWindow strange( 0 );
strange = StrangeWindow( &theWindow );
return strange;
}